Windows temporary directory
You can get windows temporary directory by calling GetTempPath API function.
Example:
- Drop a Label and a Button.
- At buttons OnClick event write:
var
TempDir: PChar;
begin
StrAlloc(100);
GetTempPath(100, TempDir);
Label1.Caption:= TempDir;
StrDispose(TempDir);
Notes:
- Result will be windows directory end with back slach such as:
c:\windows\temp\
- Windows temprary directory used for most temprary files transactions, extraction,
saving temprary data, and many other benefits.
See also:
Windows directory
User name and computer name